package com.xnx.bincker.leader.core.annotation;

import java.lang.annotation.*;

/**
 * 返回的数据中只包含某些属性
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.TYPE})
@Repeatable(OnlyIncludeProperties.OnlyIncludePropertiesContainer.class)
public @interface OnlyIncludeProperties {
    /**
     * 过滤对象
     */
    Class<?> target();

    /**
     * 属性名
     */
    String[] value();

    @Documented
    @Retention(RetentionPolicy.RUNTIME)
    @Target({ElementType.METHOD, ElementType.TYPE})
    @interface OnlyIncludePropertiesContainer {
        OnlyIncludeProperties[] value();
    }
}
